"""
用户 DB
"""

from bson import ObjectId

from db_base.mongodb_db.base import CollectionBase


class _Attendance(CollectionBase):
    """
    考勤

    >>> {
    ...     "_id" : ObjectId("658006589567a8ffbc471c6d"),
    ...     "create_time" : "2023-12-18 16:44:08",
    ...     "update_time" : "2023-12-18 16:44:08",
    ...     "id" : 1,
    ...     "is_deleted" : 0,
    ...     "code" : "ATTENDANCE220316400475066",
    ...     "note" : None,
    ...     "desc" : None,
    ...     "user_id" : 1,
    ...     "attendance_date" : "2021-11-01",
    ...     "status" : 5,
    ...     "leave" : None,
    ...     "clock_in" : "08:30:00",
    ...     "clock_out" : "20:06:30",
    ...     "day_type" : "workday",
    ...     "vocation" : None,
    ...     "weekday" : 1,
    ...     "leave_hour" : None,
    ...     "extra_work_hour" : 2.61,
    ...     "overtime_hour" : 0.0,
    ...     "noon_rest_hour" : 1.0,
    ...     "need_work_hour" : 8.0,
    ...     "valid_work_hour" : 8.0,
    ...     "create_source" : "import",
    ...     "delete_source" : None,
    ...     "update_source" : "import",
    ...     "is_default" : 0
    ... }
    """

    collection_name: str = "attendance"


attendance: _Attendance = _Attendance()
